/**
 * @author liangxi
 * @since 2023/12/21
 */

#ifndef DESIGNPATTERN_MOCHA_H
#define DESIGNPATTERN_MOCHA_H

#include <memory>
#include "../CondimentDecorator.h"

namespace Decorator {

    class Mocha : public CondimentDecorator {
    public:
        explicit Mocha(const std::shared_ptr<Beverage> &b) : beverage(b) {}

        double cost() override {
            return 0.20 + beverage->cost();
        }

        [[nodiscard]] const std::string getDescription() const override {
            return this->beverage->getDescription() + ",Mocha";
        }

    private:
        std::shared_ptr<Beverage> beverage;

    };

} // Decorator

#endif //DESIGNPATTERN_MOCHA_H
